// 目的地搜索
class DestinationSearchModel {
  InputInfoType? inputInfoType;// 输入信息类型
  SuggestTabType? suggestTabType;//  建议标签类型
  SuggestHotDistrictType? suggestHotDistrictType;// 建议热门地区类型
  SuggestPoiType? suggestPoiType;// 建议poi类型
  SuggestRecommendType? suggestRecommendType;// 建议推荐类型
  List<String>? orders;
  SuggestPreferType? suggestPreferType;/// 建议首选类型
  String? keyword;

  DestinationSearchModel(
      {required this.inputInfoType,
        required this.suggestTabType,
        required this.suggestHotDistrictType,
        required this.suggestPoiType,
        required this.suggestRecommendType,
        required this.orders,
        required this.suggestPreferType,
        required this.keyword});

  DestinationSearchModel.fromJson(Map<String, dynamic> json) {
    inputInfoType = json['inputInfoType'] != null
        ? new InputInfoType.fromJson(json['inputInfoType'])
        : null;
    suggestTabType = json['suggestTabType'] != null
        ? new SuggestTabType.fromJson(json['suggestTabType'])
        : null;
    suggestHotDistrictType = json['suggestHotDistrictType'] != null
        ? new SuggestHotDistrictType.fromJson(json['suggestHotDistrictType'])
        : null;
    suggestPoiType = json['suggestPoiType'] != null
        ? new SuggestPoiType.fromJson(json['suggestPoiType'])
        : null;
    suggestRecommendType = json['suggestRecommendType'] != null
        ? new SuggestRecommendType.fromJson(json['suggestRecommendType'])
        : null;
    orders = json['orders'].cast<String>();
    suggestPreferType = json['suggestPreferType'] != null
        ? new SuggestPreferType.fromJson(json['suggestPreferType'])
        : null;
    keyword = json['keyword'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.inputInfoType != null) {
      data['inputInfoType'] = this.inputInfoType!.toJson();
    }
    if (this.suggestTabType != null) {
      data['suggestTabType'] = this.suggestTabType!.toJson();
    }
    if (this.suggestHotDistrictType != null) {
      data['suggestHotDistrictType'] = this.suggestHotDistrictType!.toJson();
    }
    if (this.suggestPoiType != null) {
      data['suggestPoiType'] = this.suggestPoiType!.toJson();
    }
    if (this.suggestRecommendType != null) {
      data['suggestRecommendType'] = this.suggestRecommendType!.toJson();
    }
    data['orders'] = this.orders;
    if (this.suggestPreferType != null) {
      data['suggestPreferType'] = this.suggestPreferType!.toJson();
    }
    data['keyword'] = this.keyword;
    return data;
  }
}

/// 输入信息类型
class InputInfoType {
  PoiInfoType? poiInfoType;

  InputInfoType({this.poiInfoType});

  InputInfoType.fromJson(Map<String, dynamic> json) {
    poiInfoType = json['poiInfoType'] != null
        ? new PoiInfoType.fromJson(json['poiInfoType'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.poiInfoType != null) {
      data['poiInfoType'] = this.poiInfoType!.toJson();
    }
    return data;
  }
}

/// poi信息类型
class PoiInfoType {
  late int poid;
  late String displayName;
  late String searchName;
  late String dataType;
  late String upperName;

  PoiInfoType(
      {required this.poid,
        required this.displayName,
        required this.searchName,
        required this.dataType,
        required this.upperName});

  PoiInfoType.fromJson(Map<String, dynamic> json) {
    poid = json['poid'];
    displayName = json['displayName'];
    searchName = json['searchName'];
    dataType = json['dataType'];
    upperName = json['upperName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['poid'] = this.poid;
    data['displayName'] = this.displayName;
    data['searchName'] = this.searchName;
    data['dataType'] = this.dataType;
    data['upperName'] = this.upperName;
    return data;
  }
}

///  建议标签类型
class SuggestTabType {
  late String title;
  late List<TabInfoTypes> tabInfoTypes;

  SuggestTabType({required this.title, required this.tabInfoTypes});

  SuggestTabType.fromJson(Map<String, dynamic> json) {
    title = json['title'];
    if (json['tabInfoTypes'] != null) {
      tabInfoTypes = [];
      json['tabInfoTypes'].forEach((v) {
        tabInfoTypes.add(new TabInfoTypes.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['title'] = this.title;
    if (this.tabInfoTypes != null) {
      data['tabInfoTypes'] = this.tabInfoTypes.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

/// 选项卡信息类型
class TabInfoTypes {
  late String tabId;
  late String tabName;
  late String type;

  TabInfoTypes({required this.tabId, required this.tabName, required this.type});

  TabInfoTypes.fromJson(Map<String, dynamic> json) {
    tabId = json['tabId'];
    tabName = json['tabName'];
    type = json['type'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['tabId'] = this.tabId;
    data['tabName'] = this.tabName;
    data['type'] = this.type;
    return data;
  }
}

/// 建议热门地区类型
class SuggestHotDistrictType {
  late String title;
  late List<HotPoiTypes> hotPoiTypes;

  SuggestHotDistrictType({required this.title, required this.hotPoiTypes});

  SuggestHotDistrictType.fromJson(Map<String, dynamic> json) {
    title = json['title'];
    if (json['hotPoiTypes'] != null) {
      hotPoiTypes = [];
      json['hotPoiTypes'].forEach((v) {
        hotPoiTypes.add(new HotPoiTypes.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['title'] = this.title;
    if (this.hotPoiTypes != null) {
      data['hotPoiTypes'] = this.hotPoiTypes.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

/// 热点poi类型
class HotPoiTypes {
  late int poid;
  late String displayName;
  late String searchName;

  HotPoiTypes({ required this.poid, required this.displayName, required this.searchName});

  HotPoiTypes.fromJson(Map<String, dynamic> json) {
    poid = json['poid'];
    displayName = json['displayName'];
    searchName = json['searchName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['poid'] = this.poid;
    data['displayName'] = this.displayName;
    data['searchName'] = this.searchName;
    return data;
  }
}

/// 建议poi类型
class SuggestPoiType {
  late List<PoiInfoTypes> poiInfoTypes;

  SuggestPoiType({required this.poiInfoTypes});

  SuggestPoiType.fromJson(Map<String, dynamic> json) {
    if (json['poiInfoTypes'] != null) {
      poiInfoTypes = [];
      json['poiInfoTypes'].forEach((v) {
        poiInfoTypes.add(new PoiInfoTypes.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.poiInfoTypes != null) {
      data['poiInfoTypes'] = this.poiInfoTypes.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

/// poi信息类型
class PoiInfoTypes {
  late int poid;
  late String displayName;
  late String searchName;
  late String dataType;
  late String upperName;

  PoiInfoTypes({required this.displayName, required this.searchName});

  PoiInfoTypes.fromJson(Map<String, dynamic> json) {
    poid = json['poid'];
    displayName = json['displayName'];
    searchName = json['searchName'];
    dataType = json['dataType'];
    upperName = json['upperName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['poid'] = this.poid;
    data['displayName'] = this.displayName;
    data['searchName'] = this.searchName;
    data['dataType'] = this.dataType;
    data['upperName'] = this.upperName;
    return data;
  }
}

/// 建议推荐类型
class SuggestRecommendType {
  late String title;
  late List<HotPoiTypes> hotPoiTypes;

  SuggestRecommendType({required this.title, required this.hotPoiTypes});

  SuggestRecommendType.fromJson(Map<String, dynamic> json) {
    title = json['title'];
    if (json['hotPoiTypes'] != null) {
      hotPoiTypes = [];
      json['hotPoiTypes'].forEach((v) {
        hotPoiTypes.add(new HotPoiTypes.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['title'] = this.title;
    if (this.hotPoiTypes != null) {
      data['hotPoiTypes'] = this.hotPoiTypes.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

/// 建议首选类型
class SuggestPreferType {
  late String title;
  late List<PreferInfoTypes> preferInfoTypes;

  SuggestPreferType({required this.title, required  this.preferInfoTypes});

  SuggestPreferType.fromJson(Map<String, dynamic> json) {
    title = json['title'];
    if (json['preferInfoTypes'] != null) {
      preferInfoTypes = [];
      json['preferInfoTypes'].forEach((v) {
        preferInfoTypes.add(new PreferInfoTypes.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['title'] = this.title;
    if (this.preferInfoTypes != null) {
      data['preferInfoTypes'] =
          this.preferInfoTypes.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

/// 首选信息类型
class PreferInfoTypes {
  late String preferType;
  late String preferName;
  late String id;
  late String name;

  PreferInfoTypes({required this.preferType, required this.preferName, required this.id, required this.name});

  PreferInfoTypes.fromJson(Map<String, dynamic> json) {
    preferType = json['preferType'];
    preferName = json['preferName'];
    id = json['id'];
    name = json['name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['preferType'] = this.preferType;
    data['preferName'] = this.preferName;
    data['id'] = this.id;
    data['name'] = this.name;
    return data;
  }
}
